package com.lhy.admin.service;

import com.lhy.admin.mapper.RoleMapper;
import com.lhy.admin.model.Role;
import com.lhy.commonweb.service.AbstractService;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

@Service
public class RoleService extends AbstractService<Role, Integer> {

    public RoleService(@Qualifier("roleMapper") Mapper<Role> mapper) {
        super(mapper);
    }

    public List<Role> listRolesByUserName(String userName) {
        RoleMapper mapper = getMapper();
        return mapper.listRolesByUserName(userName);
    }


}
